using System;
using System.Collections.Generic;
using System.Text;
using System.Windows;

namespace PSE.Framework.UI.Controls.SmartClient
{
    public delegate void BufferedEventHandler<T>(object sender, BufferedEventArgs<T> e)
    where T : RoutedEventArgs;

    public class BufferedEventArgs<T>:RoutedEventArgs
        where T:RoutedEventArgs
    {
        private T _originalEventArgs;
        public T OriginalEventArgs
        {
            get { return _originalEventArgs; }
            set { _originalEventArgs = value; }
        }

        private int _eventCount;
        public int EventCount
        {
            get { return _eventCount; }
            set { _eventCount = value; }
        }

        private BufferedEventArgs()
        {

        }

        public BufferedEventArgs(RoutedEvent routedEvent, T originalEventArgs, int eventCount)
            :base(routedEvent)
        {
            this.OriginalEventArgs = originalEventArgs;
            this.EventCount = eventCount;
        }
    }
}
